home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Interfaces & Libraries / interfaces / layout routines.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-29  |  9.1 KB  |  168 lines  |  [TEXT/MPS ]

  1. /* layout routines.h -- Line Layout calls
  2.  
  3.     by Eric Mader and Dave Opstad,
  4.     with special thanks to the following folks:
  5.         • Mark Davis, for starting it all off;
  6.         • Russ Sonnenschein, for many good ideas;
  7.         • Cary Clark, Dave Good, Rob Johnson, Keith McGreggor, and Chris Yerga for the graphics system;
  8.         • Richard Becker, Lynn Bekkala and Mike Reed for fonts and the font system;
  9.         • Robert Dierkes and the SQE team for testing and good ideas;
  10.         • Parry Kejriwal and Richard Klein, for font tools;
  11.         • Diane Patterson, for great patience in writing documentation;
  12.         • Hugo Ayala, Tom Dowdy, Dan Lipton, Sean Parent and the rest of the PrintShop;
  13.         • Mitch Allen for managing to manage us; and
  14.         • many other good folk at Apple!
  15. */
  16.  
  17. /* Copyright ©1998-1992 Apple Computer, Inc.  All rights reserved. */
  18.  
  19. #ifndef layoutRoutinesIncludes
  20. #define layoutRoutinesIncludes
  21.  
  22. #ifndef graphicsTypesIncludes
  23.     #include "graphics types.h"
  24. #endif
  25.  
  26. #ifndef layoutTypesIncludes
  27.     #include "layout types.h"
  28. #endif layoutTypesIncludes
  29.  
  30. #ifdef appleInternal
  31.     #define GXInlineCode(x)
  32. #endif
  33. #ifndef GXInlineCode
  34.     #define GXInlineCode(x)   = {0x303C, x, 0xA832}
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. gxShape GXNewLayout(long textRunCount, const short textRunLengths[], const void *text[],
  42.     long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
  43.     const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
  44.     const gxPoint *position) GXInlineCode(0x117F);
  45.  
  46. long GXGetLayout(gxShape layout, void *text, long *styleRunCount, short styleRunLengths[],
  47.     gxStyle styles[], long *levelRunCount, short levelRunLengths[], short levels[],
  48.     gxLayoutOptions *layoutOptions, gxPoint *position) GXInlineCode(0x1180);
  49.  
  50. void GXSetLayout(gxShape layout, long textRunCount, const short textRunLengths[], const void *text[],
  51.     long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
  52.     const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
  53.     const gxPoint *position) GXInlineCode(0x1181);
  54.  
  55. void GXDrawLayout(long textRunCount, const short textRunLengths[], const void *text[],
  56.     long styleRunCount, const short styleRunLengths[], const gxStyle styles[], long levelRunCount,
  57.     const short levelRunLengths[], const short levels[], const gxLayoutOptions *layoutOptions,
  58.     const gxPoint *position) GXInlineCode(0x1182);
  59.  
  60. void GXSetLayoutParts(gxShape layout, gxByteOffset oldStartOffset, gxByteOffset oldEndOffset,
  61.     long newTextRunCount, const short newTextRunLengths[], const void *newText[],
  62.     long newStyleRunCount, const short newStyleRunLengths[], const gxStyle newStyles[],
  63.     long newLevelRunCount, const short newLevelRunLengths[], const short newLevels[]) GXInlineCode(0x1237);
  64.  
  65. void GXSetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  66.     gxShape insert) GXInlineCode(0x1242);
  67.  
  68. long GXGetLayoutParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset, void *text,
  69.     long *styleRunCount, short styleRunLengths[], gxStyle styles[], long *levelRunCount,
  70.     short levelRunLengths[], short levels[]) GXInlineCode(0x1238);
  71.  
  72. gxShape GXGetLayoutShapeParts(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  73.     gxShape dest) GXInlineCode(0x1243);
  74.  
  75. long GXGetLayoutGlyphs(gxShape layout, gxGlyphcode *glyphs, gxPoint positions[], long advance[],
  76.     gxPoint tangents[], long *runCount, short styleRuns[], gxStyle glyphStyles[]) GXInlineCode(0x1185);
  77.  
  78. gxByteOffset GXHitTestLayout(gxShape layout, const gxPoint *hitDown, gxHighlightType highlightType,
  79.     gxLayoutHitInfo *hitInfo, gxShape hitTrackingArea) GXInlineCode(0x1187);
  80.  
  81. gxShape GXGetLayoutHighlight(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  82.     gxHighlightType highlightType, gxShape highlight) GXInlineCode(0x1188);
  83.  
  84. gxShape GXGetLayoutVisualHighlight(gxShape layout, gxByteOffset startOffset, long startLeadingEdge,
  85.     gxByteOffset endOffset, long endLeadingEdge, gxHighlightType highlightType, gxShape highlight) GXInlineCode(0x1208);
  86.  
  87. gxShape GXGetLayoutCaret(gxShape layout, gxByteOffset offset, gxHighlightType highlightType,
  88.     gxCaretType caretType, gxShape caret) GXInlineCode(0x1189);
  89.  
  90. gxByteOffset GXGetLayoutBreakOffset(gxShape layout, gxByteOffset startOffset, fixed lineWidth,
  91.     long hyphenationCount, const gxByteOffset hyphenationPoints[], boolean *startIsStaked,
  92.     gxByteOffset *priorStake, gxByteOffset *nextStake) GXInlineCode(0x1239);
  93.  
  94. fixed GXGetLayoutRangeWidth(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  95.     gxShape supplementaryText) GXInlineCode(0x123A);
  96.  
  97. gxShape GXNewLayoutFromRange(gxShape layout, gxByteOffset startOffset, gxByteOffset endOffset,
  98.     const gxLayoutOptions *layoutOptions, gxShape supplementaryText) GXInlineCode(0x123B);
  99.  
  100. gxShape GXGetCaretAngleArea(gxShape layout, const gxPoint *hitPoint, gxHighlightType highlightType,
  101.     gxShape caretArea, short *returnedRise, short *returnedRun) GXInlineCode(0x118A);
  102.  
  103. void GXGetStyleBaselineDeltas(gxStyle baseStyle, gxBaselineType baseType,
  104.     gxBaselineDeltas returnedDeltas) GXInlineCode(0x118B);
  105.  
  106. gxByteOffset GXGetRightVisualOffset(gxShape layout, gxByteOffset currentOffset) GXInlineCode(0x118D);
  107. gxByteOffset GXGetLeftVisualOffset(gxShape layout, gxByteOffset currentOffset) GXInlineCode(0x118E);
  108.  
  109. void GXGetCompoundCharacterLimits(gxShape layout, gxByteOffset trial, gxByteOffset *minOffset,
  110.     gxByteOffset *maxOffset, boolean *onBoundary) GXInlineCode(0x118F);
  111.  
  112. void GXGetOffsetGlyphs(gxShape layout, gxByteOffset trial, long leadingEdge,
  113.     gxLayoutOffsetState *offsetState, unsigned short *firstGlyph, unsigned short *secondGlyph) GXInlineCode(0x1209);
  114.  
  115. void GXGetGlyphOffsets(gxShape layout, gxByteOffset trial, long onLeftTop, gxByteOffset *offset,
  116.     boolean *leadingEdge, boolean *wasRealCharacter) GXInlineCode(0x120A);
  117.  
  118. void GXGetLayoutSpan(gxShape layout, fixed *lineAscent, fixed *lineDescent) GXInlineCode(0x1190);
  119. void GXSetLayoutSpan(gxShape layout, fixed lineAscent, fixed lineDescent) GXInlineCode(0x1191);
  120.  
  121. void GXSetStyleRunControls(gxStyle target, const gxRunControls *runControls) GXInlineCode(0x1192);
  122. void GXSetStyleRunPriorityJustOverride(gxStyle target,
  123.     const gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x1193);
  124. void GXSetStyleRunGlyphJustOverrides(gxStyle target, long count,
  125.     const gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x1194);
  126. void GXSetStyleRunGlyphSubstitutions(gxStyle target, long count,
  127.     const gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x1195);
  128. void GXSetStyleRunFeatures(gxStyle target, long count, const gxRunFeature runFeatures[]) GXInlineCode(0x1196);
  129. void GXSetStyleRunKerningAdjustments(gxStyle target, long count,
  130.     const gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x1197);
  131.  
  132. void GXSetShapeRunControls(gxShape target, const gxRunControls *runControls) GXInlineCode(0x1198);
  133. void GXSetShapeRunPriorityJustOverride(gxShape target,
  134.     const gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x1199);
  135. void GXSetShapeRunGlyphJustOverrides(gxShape target, long count,
  136.     const gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x119A);
  137. void GXSetShapeRunGlyphSubstitutions(gxShape target, long count,
  138.     const gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x119B);
  139. void GXSetShapeRunFeatures(gxShape target, long count, const gxRunFeature runFeatures[]) GXInlineCode(0x119C);
  140. void GXSetShapeRunKerningAdjustments(gxShape target, long count,
  141.     const gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x119D);
  142.  
  143. long GXGetStyleRunControls(gxStyle source, gxRunControls *runControls) GXInlineCode(0x119E);
  144. long GXGetStyleRunPriorityJustOverride(gxStyle source,
  145.     gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x119F);
  146. long GXGetStyleRunGlyphJustOverrides(gxStyle source,
  147.     gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x11A0);
  148. long GXGetStyleRunGlyphSubstitutions(gxStyle source, gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x11A1);
  149. long GXGetStyleRunFeatures(gxStyle source, gxRunFeature runFeatures[]) GXInlineCode(0x11A2);
  150. long GXGetStyleRunKerningAdjustments(gxStyle source, gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x11A3);
  151.  
  152. long GXGetShapeRunControls(gxShape source, gxRunControls *runControls) GXInlineCode(0x11A4);
  153. long GXGetShapeRunPriorityJustOverride(gxShape source,
  154.     gxPriorityJustificationOverride *priorityJustificationOverride) GXInlineCode(0x11A5);
  155. long GXGetShapeRunGlyphJustOverrides(gxShape source,
  156.     gxGlyphJustificationOverride glyphJustificationOverrides[]) GXInlineCode(0x11A6);
  157. long GXGetShapeRunGlyphSubstitutions(gxShape source, gxGlyphSubstitution glyphSubstitutions[]) GXInlineCode(0x11A7);
  158. long GXGetShapeRunFeatures(gxShape source, gxRunFeature runFeatures[]) GXInlineCode(0x11A8);
  159. long GXGetShapeRunKerningAdjustments(gxShape source, gxKerningAdjustment kerningAdjustments[]) GXInlineCode(0x11A9);
  160.  
  161. #ifdef __cplusplus
  162. }
  163. #endif
  164.  
  165. #undef GXInlineCode
  166.  
  167. #endif layoutRoutinesIncludes
  168.